package com.adp.interceptor;

import com.adf.config.component.application.report.ReportBean;
import com.adf.system.ReportRequest;
import com.adf.system.component.application.report.configbean.editablereport.AbsEditableReportEditDataBean;
import com.adf.system.intercept.AbsInterceptorDefaultAdapter;

import java.io.UnsupportedEncodingException;
import java.util.Map;

public class objArchiveEditCondition extends AbsInterceptorDefaultAdapter {

	
	@SuppressWarnings("unchecked")
	@Override
	public void doStart(ReportRequest rrequest, ReportBean rbean) {
		String objid=rrequest.getStringAttribute("objid","");
		String bool=rrequest.getRequest().getParameter("bool");
		if(bool!=null&&!bool.equals(""))
		{
			try {
				bool=new String(bool.getBytes("iso8859-1"),"utf-8");
			} catch (UnsupportedEncodingException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			rrequest.getRequest().getSession().setAttribute("bool",bool);//在session中存入pid的值，以便后面的查询条件能从中取到数据。
		}
		if(objid!=null&&!objid.equals(""))
		{
			rrequest.getRequest().getSession().setAttribute("objid",objid);//在session中存入pid的值，以便后面的查询条件能从中取到数据。
			
		}
		super.doStart(rrequest, rbean);
	}
	@SuppressWarnings("unchecked")
	@Override
	public int doSavePerRow(ReportRequest rrequest, ReportBean rbean,
                            Map<String, String> mRowData, Map<String, String> mParamValues,
                            AbsEditableReportEditDataBean editbean) {
		
		
		return super.doSavePerRow(rrequest, rbean, mRowData, mParamValues, editbean);
	}
}
